package de.kiltz.foo.mvc;

import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class StartController  implements Controller
{
    /** Logger for this class and subclasses */
    protected final Log logger = LogFactory.getLog(getClass());

    public ModelAndView handleRequest(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException
    {

        Date nun = new Date();
        logger.info("rufe Startseite auf " + nun);
        String view = "start";
        
        Map<String, Object> daten = new HashMap<String, Object>();
        daten.put("nun", nun);

        return new ModelAndView(view, "daten", daten);
    }


}
